home *** CD-ROM | disk | FTP | other *** search
- Path: etek.chalmers.se!chalmers.se!sunic!uunet!caen!uvaarpa!adastra!mbs
- From: mbs@adastra.cvl.va.us (Michael B. Smith)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Stopping dos VOLUME requesters
- Message-ID: <mbs.1sml@adastra.cvl.va.us>
- Date: 18 Mar 93 11:50:01 GMT
- References: <1993Mar17.165913.64930@qut.edu.au>
- Organization: Well, I haven't decided on a name yet...
- Lines: 41
- X-NewsSoftware: GRn-beta 1.16g (16.3.93) by Michael B. Smith & Mike Schwartz
- MIME-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
-
- In article <1993Mar17.165913.64930@qut.edu.au> podesta@qut.edu.au writes:
- > Greetings.
-
- Salutations.
-
- > When loading a file through the DOS library, the system will pop up an
- > "Insert disk PORK in any drive" requester.
- >
- > Is there a way to attempt to open a file using a volume name and have it
- > instantly fail if the disk is not present, rather than have the system open
- > a requester? Some flag in some structure, perhaps?
-
- struct Process
- *me = (struct Process *) FindTask (NULL);
- APTR
- my_winptr = me->pr_WindowPtr;
- BPTR
- fh;
- int
- err;
-
- me->pr_WindowPtr = -1;
- fh = Open ("PORK:filename", MODE_OLDFILE);
- me->pr_WindowPtr = my_winptr;
-
- if (!fh) {
- err = IoErr ();
- /* Likely errors:
- **
- ** ERROR_DEVICE_NOT_MOUNTED
- ** ERROR_DIR_NOT_FOUND
- ** ERROR_OBJECT_NOT_FOUND
- */
- }
-
- > Thanks in advance.
-
- De nada.
- --
- // Michael B. Smith
- \X/ mbs@adastra.cvl.va.us -or- uunet.uu.net!virginia.edu!adastra!mbs